Week 13: Networking & Communications

Networking & Communications

Advantages of networks include:

  • Scalability
  • Facilitating the connection of systems across locations
  • Improving repairability
  • Enabling the simultaneous control of various devices

Networks can have different structures:

  • Ring
  • Bus
  • Star
  • Mesh
  • ...

Networks can be organized locally or have a broader reach. We distinguish between protocol and network. Protocol is the language we use, while the network is what we build.

Important keywords in this context are:

  • Location: Refers to the physical or logical place where network components or system modules are positioned. In distributed networks, the location can influence the connection strategy and performance.
  • Parallelism: Refers to the ability of a system to perform multiple processes or operations simultaneously, often increasing efficiency and better utilization of resources.
  • Modularity: This principle involves designing a system in independent modules that can be developed, tested, reused, or replaced separately to simplify system maintenance and development.
  • Interference: In networks, this refers to disruptions or cross-talk between different communication channels that can impair data transmission. Managing interference is crucial for maintaining network performance.

To decide which network we want to build, it is fundamental to know what we want to do with it.

We are talking about serial interfaces. These are interfaces that transmit data bit by bit sequentially. This is the most common form of data transmission in many systems, as it is cost-effective and simple to implement.

There are synchronous and asynchronous communications:

  • Synchronous: Data transmission where the sender and receiver are continuously synchronized, often through a common clock.
  • Asynchronous: Data transmission without continuous synchronization. Instead, start and stop bits are used to mark data blocks.

We use RX to receive data and TX to send data. So we have to connect TX with RX, RX with TX and GND with GND.

Under Serial Timing, we understand serial communication and timing to ensure that the sender and receiver are correctly synchronized and data is transmitted error-free.

UART (Universal Asynchronous Receiver-Transmitter): A widely used hardware mechanism for asynchronous serial communication between devices.

USB Serial: An implementation of the USB interface that allows using USB for serial communication, often to connect computers with external devices like microcontrollers or other network devices.

I2C: The I2C (Inter-Integrated Circuit) protocol allows multiple child circuits to communicate with one or more parent circuits. It is intended for short distances within a device. I2C is particularly practical because it supports multiple parents and child without changing the number of required wires. Moreover, only the masters can actively control the data line, preventing childs from blocking the line when another device is transmitting. To enable this communication, a special communication protocol is needed: SPI "Serial Peripheral Interface". With just two wires, you can talk to over 1000 devices.

Wire.begin(); > If nothing is between the brackets, it means the parent, at 9 it means the child.

Wireless communication

We distinguish between 3G/4G/5G: 3G has the lowest frequency, while 5G has the highest frequency. Therefore, 5G is more powerful, and the data transmission speed is faster. However, these higher frequencies have a shorter range and poorer penetration of solid objects like walls. Thus, 5G networks rely on denser antenna configurations to ensure comprehensive coverage.

Connecting SAMD21

For my final project, I need a capacitive touch board that communicates with my board controlling a speaker. The sound generated by capacitive touch should be audible through the speaker. Thus, I plan to connect my existing board to a new board, which will serve as a speaker, using TX and RX connections. I use not all pins on my touch board (SAMD21), so I can designate some as TX and RX. However, I had to redesign the board since it initially had no outputs for TX and RX integrated.

Files

Files